package com.yoooya.base.model.vo;

import java.io.Serializable;

/**
 * @创建人 Sun Yijing
 * @创建时间 2018-06-28
 */
public class BaseResp implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 请求成功
	 */
	public static byte RC_OK = 0;
	/**
	 * 请求失败
	 */
	public static byte RC_NOT = 1;
	/**
	 * 请求的地址不存在或者包含不支持的参数
	 */
	public static byte RC_BAD_REQUEST = 16;
	/**
	 * 未授权
	 */
	public static byte RC_UNAUTHORIZED = 17;
	/**
	 * 被禁止访问
	 */
	public static byte RC_FORBIDDEN = 18;
	/**
	 * 请求的资源不存在
	 */
	public static byte RC_NOT_FOUND = 19;
	/**
	 * 服务内部错误
	 */
	public static byte RC_INTERNAL_SERVER_ERROR = 32;

	/**
	 * 业务逻辑错误
	 */
	public static byte RC_BIZ_ERROR = 80;

	/**
	 * 应答返回码
	 */
	private int code = RC_OK;

	/**
	 * 应答返回消息
	 */
	private String msg;

	/**
	 * 跳转url
	 */
	private String url = "";

	private int count;

	private boolean success = false;// 是否成功

	private Object data;

	public BaseResp() {
		this.code = BaseResp.RC_OK;
		this.msg = "请求成功";
		this.success = true;
	}

	public BaseResp(int retCode, String retMsg) {
		this.code = retCode;
		this.msg = retMsg;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}



}
